package com.kolaxy.feignconsumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <一句话功能描述><功能详细描述>
 *
 * @author zhourunjin
 * @version: [版本号，2018-09-06]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@RestController
public class ConsumerController {

    @Autowired
    HelloService helloService;

    @RequestMapping(value = "feign-consumer",method = RequestMethod.GET)
    public String helloConsumer(){
        return helloService.hello();
    }

    @RequestMapping(value = "feign-consumer2",method = RequestMethod.GET)
    public String helloConsumer2(){
        StringBuilder sb = new StringBuilder();
        sb.append(helloService.hello("zhangsan")).append("\n");
        sb.append(helloService.hello("lisi",16)).append("\n");
        return sb.toString();

    }
}
